spatie-laravel-activitylog display only changed data

94

protected static $logAttributes = [];     

public static function boot()
{
    parent::boot();
    static::saving(function (Model $model) {
        static::$logAttributes = array_keys($model->getDirty());
    });
}

Comments

Submit
0 Comments